﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Shutterstock.Salesforce.Tools.SFPartner;
using System.Xml;

namespace Shutterstock.Salesforce.Tools
{
    [AttributeUsage(AttributeTargets.Property)]
    public class SalesforceColumnAttribute : Attribute
    {
        /// <summary>
        /// Initializes a new instance of the SalesforceColumnAttribute class.
        /// </summary>
        public SalesforceColumnAttribute(Boolean includeIfNull, String columnName, Int32 maxWidth, String defaultValue, Boolean isIdentity)
        {
            IncludeIfNullOrWhitespace = includeIfNull;
            Name = columnName;
            MaxWidth = maxWidth;
            DefaultValue = defaultValue;
            IsIdentity = isIdentity;
        }

        public SalesforceColumnAttribute(Boolean includeIfNull) : this(includeIfNull, null, 0, null, false) { }
        public SalesforceColumnAttribute() : this(false, null, 0, null, false) { }


        public Boolean IncludeIfNullOrWhitespace { get; set; }
        public String Name { get; set; }
        public Boolean IsIdentity { get; set; }
        public Int32 MaxWidth { get; set; }
        public String DefaultValue { get; set; }
    }



    [AttributeUsage(AttributeTargets.Class)]
    public class SalesforceEntitiyAttribute : Attribute
    {
        /// <summary>
        /// Initializes a new instance of the SalesforceEntitiyAttribute class.
        /// </summary>
        public SalesforceEntitiyAttribute(String sObjectType)
        {
            SObjectType = sObjectType;
        }

        public  String SObjectType { get; set; } // OpportunityLineItem
    }
}